﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using ShahyadS.TFSBuildInspectionModel;
using System.ComponentModel;

namespace ShahyadS.BuildInspectorVSPackage.Inspector
{
	/// <summary>
	/// Interaction logic for BuildDefinitionSelectionWindow.xaml
	/// </summary>
	public partial class BuildDefinitionSelectionWindow : Window
	{
		public BuildDefinitionCollection BDC;
		public BuildDefinitionSelectionWindow(BuildDefinitionCollection bdc)
		{
			BDC = bdc;
			InitializeComponent();
			ListCollectionView collection = new ListCollectionView(BDC.AllBuildDefinitions);
			collection.GroupDescriptions.Add(new PropertyGroupDescription("Extension"));
			collection.GroupDescriptions.Add(new PropertyGroupDescription("Line"));
			collection.SortDescriptions.Add(new SortDescription("Extension", ListSortDirection.Ascending));
			collection.SortDescriptions.Add(new SortDescription("Line", ListSortDirection.Ascending));
			collection.SortDescriptions.Add(new SortDescription("Name", ListSortDirection.Ascending));
			dataGrid1.ItemsSource = collection;
		}
	}
}
